<template>
  <div class="echart-outer-wrapper">
    <div class="num-all">
      <div class="num-item">
        <div class="num">
          <img class="icon" src="~@/assets/images/bg-audit-num-1.png" alt />
          <div class="text">{{ numData ? numData.ajzs : "-" }}</div>
          <div class="dw">件</div>
        </div>
        <div class="name">案件总数</div>
      </div>
      <div class="num-item">
        <div class="num">
          <img class="icon" src="~@/assets/images/bg-audit-num-2.png" alt />
          <div class="text">{{ numData ? numData.zzssjs : "-" }}</div>
          <div class="dw">件</div>
        </div>
        <div class="name">正在诉讼</div>
      </div>
      <div class="num-item">
        <div class="num">
          <img class="icon" src="~@/assets/images/bg-audit-num-3.png" alt />
          <div class="text">{{ numData ? numData.zzfyjs : "-" }}</div>
          <div class="dw">件</div>
        </div>
        <div class="name">正在复议</div>
      </div>
      <div class="num-item">
        <div class="num">
          <img class="icon" src="~@/assets/images/bg-audit-num-4.png" alt />
          <div class="text">{{ numData ? numData.zdyajs : "-" }}</div>
          <div class="dw">件</div>
        </div>
        <div class="name">重大要案</div>
      </div>
      <div class="num-item">
        <div class="num">
          <img class="icon" src="~@/assets/images/bg-audit-num-5.png" alt />
          <div class="text money">{{ numData ? numData.cbse : "-" }}</div>
          <div class="dw money">万元</div>
        </div>
        <div class="name">查补税额</div>
      </div>
      <div class="num-item">
        <div class="num">
          <img class="icon" src="~@/assets/images/bg-audit-num-6.png" alt />
          <div class="text money">{{ numData ? numData.fkje : "-" }}</div>
          <div class="dw money">万元</div>
        </div>
        <div class="name">罚款</div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: "xsajzs",
  data() {
    return {
      prevDate: null,
      numData: null,
    };
  },
  created() {
    let date = "";
    let month = new Date().getMonth() + 1;
    let year = new Date().getFullYear();
    date = year + "-" + month;
    this.prevDate = date;
  },
  mounted() {
    this.ajax({
      url: "/dpzsJccxService/xsajzsQuery",
      method: "post",
      data: {
        param: {
          swjg: this.$route.query.qx_swjg_dm,
          tjny: this.prevDate,
        },
      },
    }).then((res) => {
      res = res.data;
      if (res.rtnCode !== "200") {
        this.$message.error(res.rtnMsg);
        return;
      }
      this.numData = res.data;
    });
  },
};
</script>

<style scoped lang="scss">
.echart-outer-wrapper {
  width: 770px;
  height: 314px;
}
.money {
  color: #fbe671 !important;
}
.num-all {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-evenly;
  height: 100%;
  align-items: center;
  .num-item {
    margin-top: 10px;
    flex: 0 0 33%;
    width: 33%;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 120px;
    background-size: contain;
    background-position: center center;
    background-repeat: no-repeat;
    background-image: url("~@/assets/images/bg-audit-num.png");
    .num {
      margin-top: -4px;
      display: flex;
      justify-content: center;
      align-items: flex-end;
      .icon {
        flex: 0 0 40px;
        width: 40px;
        height: 40px;
      }
      .text {
        margin: 0 2px;
        font-size: 26px;
        line-height: 34px;
        color: #ffffff;
      }
      .dw {
        font-size: 14px;
        line-height: 28px;
        color: #ffffff;
      }
    }
    .name {
      margin-top: 8px;
      font-size: 20px;
      color: #ffffff;
      text-align: center;
    }
  }
}
</style>
